home *** CD-ROM | disk | FTP | other *** search
/ Cream of the Crop 12 / Cream of the Crop 12 (Part II) / Cream of the Crop 12 (Part II).iso / OS2 / VD08BIN.ZIP / usr / include / db / DBFile.h < prev    next >
Encoding:
C/C++ Source or Header  |  1996-02-13  |  1.5 KB  |  84 lines

  1. #ifndef _DBFILE_H_
  2. #define _DBFILE_H_
  3.  
  4. #ifndef _DBTYPES_H_
  5. #include "DBTypes.h"
  6. #endif
  7.  
  8. #ifndef _DBFIELD_H_
  9. #include "DBField.h"
  10. #endif
  11.  
  12. #ifndef _DBSEARCHARG_H_
  13. #include "DBSearchArg.h"
  14. #endif
  15.  
  16. #ifndef _DBENTITIES_H_
  17. #include "DBEntities.h"
  18. #endif
  19.  
  20. #ifndef _SIMPLELIST_H_
  21. #include <util/SimpleList.h>
  22. #endif
  23.  
  24. #include <stdio.h>
  25.  
  26. @interface DBFile : Object <DBEntities>
  27. {
  28.    DBHEADER   *dbHeader;
  29.    SimpleList *fieldList;
  30.  
  31.    FILE       *fileHandle;
  32.    void       *buffer;
  33.    char      **fieldOffset;
  34.    long        currentRecord;
  35.  
  36.    char       *fileName;
  37.    id          searchArguments;
  38.  
  39.    id          index;
  40. }
  41.  
  42. - init:(char *) aFileName;
  43. - create: (char *) aFileName withFields: (int) count list: (DBFIELD *) fields;
  44. - free;
  45.  
  46. - field: (int) fieldNumber;
  47. - (int) fieldCount;
  48.  
  49. - readRecord: (long) offset;
  50. - writeRecord: (long) offset;
  51. - (long) currentRecord;
  52. - (BOOL) deleted;
  53.  
  54. - append;
  55. - replace;
  56. - delete;
  57. - undelete;
  58. - clear;
  59.  
  60. - (BOOL) findFirst;
  61. - (BOOL) findNext;
  62.  
  63. - (void *) copyBuffer;
  64. - (void *) copyBufferTo: (void *) aBuffer;
  65. - setBuffer: (void *) aBuffer;
  66.  
  67. - (long) recordCount;
  68.  
  69. -setSearchArguments: args;
  70. -searchArguments;
  71.  
  72. -useIndex: anIndex;
  73.  
  74. /* -------------------- Protocol "DBEntities" --------------------- */
  75. -database;
  76. -getProperties: (SimpleList *) aList;
  77. -(BOOL) matchesEntity: (id <DBEntities>) anEntity;
  78. -(const char *) entityName;
  79. -propertyNamed: (const char *) aName;
  80.  
  81. @end
  82.  
  83. #endif
  84.